package com.nave.segundaguerra.servidorecliente.cliente;

import java.io.IOException;
import java.io.InputStream;

import com.nave.segundaguerra.game.Player;
import com.nave.segundaguerra.game.SpriteBala;
import com.nave.segundaguerra.servidorecliente.util.ImageLibrary;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.PointF;
import android.util.Log;

public class TiroCliente {

	private Bitmap tiro;
	private PointF posicaoTiro;
	private Paint paint;
	
	public TiroCliente(PointF pos){		
		paint = new Paint();
		paint.setColor(Color.BLACK);
		this.posicaoTiro = pos;
		
	}
	
	public void draw(Canvas canvas){
		if(tiro != null){
			canvas.drawBitmap(this.tiro, this.posicaoTiro.x, this.posicaoTiro.y, paint);
		}else {
			canvas.drawCircle(this.posicaoTiro.x, this.posicaoTiro.y, 5, paint);
		}
	}
	
	public PointF getPosition(){
		return posicaoTiro;
	}
	
	public void setPosition(PointF pos){
		this.posicaoTiro = pos;
	}
	
}
